package com.ukao.cashregister.bean;

import com.ukao.cashregister.eventbus.MembershipCardEvent;

import java.io.Serializable;

import static com.ukao.cashregister.eventbus.MembershipCardEvent.Message.login;

/**
 * Created by ukaodev on 2017/7/14.
 */

public class StringBean  implements Serializable {
    /**
     * id : 1
     * amt : 10
     * name : 加急
     */
    private String id;
    private int amt;
    private String name;

    public String getId() {
        return id;
    }

    public int getAmt() {
        return amt;
    }

    public String getName() {
        return name;
    }



    /**
     * data : 17
     * httpCode : 200
     * msg : 请求成功
     * timestamp : 1500017024477
     */

    private String data;
    private int httpCode;
    private String msg;
    private long timestamp;



    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public int getHttpCode() {
        if (httpCode==403||httpCode==401){

            MembershipCardEvent.postNoData(login);

        }
        return httpCode;
    }

    public void setHttpCode(int httpCode) {

        this.httpCode = httpCode;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }
}
